module LambdaTypes where
 
data LambdaType = LtBool | LtInt | LtArrow LambdaType LambdaType | LUserDef String |LtUnknown
						deriving (Eq,Show)
						
--elemento para formar un contexto
type LTypeDefinition = (String, LambdaType)   

type LProgram          = [LDefinition]
type LUserDefinedTypes = [(String, [LConstructorType])]

data LConstructorType = LConstructorType String [LambdaType]
							deriving (Eq,Show)

							
data LDefinition = LDefinition String LExp LProgram   --LProgram son las definiciones locales
					deriving (Eq,Show)	
data LExp = 
            LApp LExp LExp
          | LTypeConstructor String [LExp]
          | LInteger String 
          | LVariable String
          | LBoolean String
          | LLambda LExp LambdaType LExp  --nombre de la var, tipo, exprecion, definiciones locales
          | LIf     LExp LExp LExp        --if e then e' else e''
          | LIfOnly LExp LExp             --if e then e' else e''  
             deriving (Eq,Show)      
